if ($msg eq 'set-name') {
  $self->{callback} = 'set-name';
  $self->{calluser} = $user; 
  $self->sendMessage("What would you like to set the bot's name to?");
}
else {
  # Check if we actually are changing the name.
  if ($self->{callback} eq 'set-name') {
    # Check we are the user that wants to change the name...
    if ($self->{calluser} eq $user) {
      $msn->setName($msg);
      $self->sendMessage("New name set.");
      delete $self->{callback};
      delete $self->{calluser};
      return;
    }
  }
}